﻿// Decompiled with JetBrains decompiler
// Type: Bannerlord.ModuleManager.ModuleInfoExtended
// Assembly: MCMv5, Version=5.10.2.0, Culture=neutral, PublicKeyToken=null
// MVID: 7AB326B9-B2B4-41C2-9177-68E944071101
// Assembly location: D:\steam\steamapps\workshop\content\261550\2859238197\bin\Win64_Shipping_Client\MCMv5.dll

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Xml;

#nullable enable
namespace Bannerlord.ModuleManager
{
  internal record ModuleInfoExtended()
  {
    private static readonly string NativeModuleId = "Native";
    private static readonly string[] OfficialModuleIds = new string[7]
    {
      ModuleInfoExtended.NativeModuleId,
      "SandBox",
      "SandBoxCore",
      "StoryMode",
      "CustomBattle",
      "BirthAndDeath",
      "Multiplayer"
    };

    public string Id { get; set; } = string.Empty;

    public string Name { get; set; } = string.Empty;

    public bool IsOfficial { get; set; }

    public ApplicationVersion Version { get; set; } = ApplicationVersion.Empty;

    public bool IsSingleplayerModule { get; set; }

    public bool IsMultiplayerModule { get; set; }

    public bool IsServerModule { get; set; }

    public IReadOnlyList<SubModuleInfoExtended> SubModules { get; set; } = (IReadOnlyList<SubModuleInfoExtended>) Array.Empty<SubModuleInfoExtended>();

    public IReadOnlyList<DependentModule> DependentModules { get; set; } = (IReadOnlyList<DependentModule>) Array.Empty<DependentModule>();

    public IReadOnlyList<DependentModule> ModulesToLoadAfterThis { get; set; } = (IReadOnlyList<DependentModule>) Array.Empty<DependentModule>();

    public IReadOnlyList<DependentModule> IncompatibleModules { get; set; } = (IReadOnlyList<DependentModule>) Array.Empty<DependentModule>();

    public string Url { get; set; } = string.Empty;

    public string UpdateInfo { get; set; } = string.Empty;

    public IReadOnlyList<DependentModuleMetadata> DependentModuleMetadatas { get; set; } = (IReadOnlyList<DependentModuleMetadata>) Array.Empty<DependentModuleMetadata>();

    public static ModuleInfoExtended? FromXml(XmlDocument? xmlDocument)
    {
      if (xmlDocument == null)
        return (ModuleInfoExtended) null;
      XmlNode xmlNode1 = xmlDocument.SelectSingleNode("Module");
      string str1 = xmlNode1?.SelectSingleNode("Id")?.Attributes?["value"]?.InnerText ?? string.Empty;
      string str2 = xmlNode1?.SelectSingleNode("Name")?.Attributes?["value"]?.InnerText ?? string.Empty;
      ApplicationVersion version1;
      ApplicationVersion.TryParse(xmlNode1?.SelectSingleNode("Version")?.Attributes?["value"]?.InnerText, out version1);
      string innerText1 = xmlNode1?.SelectSingleNode("ModuleType")?.Attributes?["value"].InnerText;
      bool? nullable1;
      if (xmlNode1 != null)
      {
        nullable1 = xmlNode1.SelectSingleNode("Official")?.Attributes?["value"]?.InnerText.Equals("true");
        if (nullable1.GetValueOrDefault())
          goto label_6;
      }
      int num1;
      if (!(innerText1 == "Official"))
      {
        num1 = innerText1 == "OfficialOptional" ? 1 : 0;
        goto label_7;
      }
label_6:
      num1 = 1;
label_7:
      bool flag1 = num1 != 0;
      string innerText2 = xmlNode1?.SelectSingleNode("ModuleCategory")?.Attributes?["value"]?.InnerText;
      if (xmlNode1 != null)
      {
        XmlNode xmlNode2 = xmlNode1.SelectSingleNode("SingleplayerModule");
        bool? nullable2;
        if (xmlNode2 == null)
        {
          nullable1 = new bool?();
          nullable2 = nullable1;
        }
        else
        {
          XmlAttributeCollection attributes = xmlNode2.Attributes;
          if (attributes == null)
          {
            nullable1 = new bool?();
            nullable2 = nullable1;
          }
          else
          {
            XmlAttribute xmlAttribute = attributes["value"];
            if (xmlAttribute == null)
            {
              nullable1 = new bool?();
              nullable2 = nullable1;
            }
            else
              nullable2 = new bool?(xmlAttribute.InnerText.Equals("true"));
          }
        }
        nullable1 = nullable2;
        if (nullable1.GetValueOrDefault())
          goto label_18;
      }
      int num2;
      if (!(innerText2 == "Singleplayer"))
      {
        num2 = innerText2 == "SingleplayerOptional" ? 1 : 0;
        goto label_19;
      }
label_18:
      num2 = 1;
label_19:
      bool flag2 = num2 != 0;
      if (xmlNode1 != null)
      {
        XmlNode xmlNode3 = xmlNode1.SelectSingleNode("MultiplayerModule");
        bool? nullable3;
        if (xmlNode3 == null)
        {
          nullable1 = new bool?();
          nullable3 = nullable1;
        }
        else
        {
          XmlAttributeCollection attributes = xmlNode3.Attributes;
          if (attributes == null)
          {
            nullable1 = new bool?();
            nullable3 = nullable1;
          }
          else
          {
            XmlAttribute xmlAttribute = attributes["value"];
            if (xmlAttribute == null)
            {
              nullable1 = new bool?();
              nullable3 = nullable1;
            }
            else
              nullable3 = new bool?(xmlAttribute.InnerText.Equals("true"));
          }
        }
        nullable1 = nullable3;
        if (nullable1.GetValueOrDefault())
          goto label_30;
      }
      int num3;
      if (!(innerText2 == "Multiplayer"))
      {
        num3 = innerText2 == "MultiplayerOptional" ? 1 : 0;
        goto label_31;
      }
label_30:
      num3 = 1;
label_31:
      bool flag3 = num3 != 0;
      bool flag4 = innerText2 == "Server" || innerText2 == "ServerOptional";
      XmlNode xmlNode4 = xmlNode1?.SelectSingleNode("DependedModules");
      XmlNodeList xmlNodeList1 = xmlNode4?.SelectNodes("DependedModule");
      List<DependentModule> dependentModuleList1 = new List<DependentModule>(xmlNodeList1 != null ? xmlNodeList1.Count : 0);
      int i1 = 0;
      int? nullable4;
      while (true)
      {
        int num4 = i1;
        nullable4 = xmlNodeList1?.Count;
        int valueOrDefault = nullable4.GetValueOrDefault();
        if (num4 < valueOrDefault & nullable4.HasValue)
        {
          XmlAttribute attribute1 = xmlNodeList1?[i1]?.Attributes?["Id"];
          if (attribute1 != null)
          {
            ApplicationVersion version2;
            ApplicationVersion.TryParse(xmlNodeList1[i1]?.Attributes?["DependentVersion"]?.InnerText, out version2);
            XmlAttribute attribute2 = xmlNodeList1[i1]?.Attributes?["Optional"];
            bool isOptional = attribute2 != null && attribute2.InnerText.Equals("true");
            dependentModuleList1.Add(new DependentModule(attribute1.InnerText, version2, isOptional));
          }
          ++i1;
        }
        else
          break;
      }
      XmlNodeList xmlNodeList2 = xmlNode1?.SelectSingleNode("ModulesToLoadAfterThis")?.SelectNodes("Module");
      List<DependentModule> dependentModuleList2 = new List<DependentModule>(xmlNodeList2 != null ? xmlNodeList2.Count : 0);
      int i2 = 0;
      while (true)
      {
        int num5 = i2;
        nullable4 = xmlNodeList2?.Count;
        int valueOrDefault = nullable4.GetValueOrDefault();
        if (num5 < valueOrDefault & nullable4.HasValue)
        {
          XmlAttribute attribute = xmlNodeList2?[i2]?.Attributes?["Id"];
          if (attribute != null)
            dependentModuleList2.Add(new DependentModule()
            {
              Id = attribute.InnerText,
              IsOptional = true
            });
          ++i2;
        }
        else
          break;
      }
      XmlNodeList xmlNodeList3 = xmlNode1?.SelectSingleNode("IncompatibleModules")?.SelectNodes("Module");
      List<DependentModule> dependentModuleList3 = new List<DependentModule>(xmlNodeList3 != null ? xmlNodeList3.Count : 0);
      int i3 = 0;
      while (true)
      {
        int num6 = i3;
        nullable4 = xmlNodeList3?.Count;
        int valueOrDefault = nullable4.GetValueOrDefault();
        if (num6 < valueOrDefault & nullable4.HasValue)
        {
          XmlAttribute attribute = xmlNodeList3?[i3]?.Attributes?["Id"];
          if (attribute != null)
            dependentModuleList3.Add(new DependentModule()
            {
              Id = attribute.InnerText,
              IsOptional = true
            });
          ++i3;
        }
        else
          break;
      }
      XmlNodeList xmlNodeList4 = xmlNode1?.SelectSingleNode("SubModules")?.SelectNodes("SubModule");
      List<SubModuleInfoExtended> moduleInfoExtendedList = new List<SubModuleInfoExtended>(xmlNodeList4 != null ? xmlNodeList4.Count : 0);
      int i4 = 0;
      while (true)
      {
        int num7 = i4;
        nullable4 = xmlNodeList4?.Count;
        int valueOrDefault = nullable4.GetValueOrDefault();
        if (num7 < valueOrDefault & nullable4.HasValue)
        {
          SubModuleInfoExtended moduleInfoExtended = SubModuleInfoExtended.FromXml(xmlNodeList4?[i4]);
          if (moduleInfoExtended != null)
            moduleInfoExtendedList.Add(moduleInfoExtended);
          ++i4;
        }
        else
          break;
      }
      string str3 = xmlNode1?.SelectSingleNode("Url")?.Attributes?["value"]?.InnerText ?? string.Empty;
      string str4 = xmlNode1?.SelectSingleNode("UpdateInfo")?.Attributes?["provider"]?.InnerText ?? string.Empty;
      string str5 = xmlNode1?.SelectSingleNode("UpdateInfo")?.Attributes?["value"]?.InnerText ?? string.Empty;
      XmlNodeList xmlNodeList5 = xmlNode1?.SelectSingleNode("DependedModuleMetadatas")?.SelectNodes("DependedModuleMetadata");
      XmlNodeList xmlNodeList6 = xmlNode1?.SelectSingleNode("LoadAfterModules")?.SelectNodes("LoadAfterModule");
      XmlNode xmlNode5 = xmlNode1?.SelectSingleNode("OptionalDependModules");
      IEnumerable<XmlNode> first1;
      if (xmlNode4 == null)
      {
        first1 = (IEnumerable<XmlNode>) null;
      }
      else
      {
        XmlNodeList source = xmlNode4.SelectNodes("OptionalDependModule");
        first1 = source != null ? source.Cast<XmlNode>() : (IEnumerable<XmlNode>) null;
      }
      if (first1 == null)
        first1 = Enumerable.Empty<XmlNode>();
      IEnumerable<XmlNode> second1;
      if (xmlNode5 == null)
      {
        second1 = (IEnumerable<XmlNode>) null;
      }
      else
      {
        XmlNodeList source = xmlNode5.SelectNodes("OptionalDependModule");
        second1 = source != null ? source.Cast<XmlNode>() : (IEnumerable<XmlNode>) null;
      }
      if (second1 == null)
        second1 = Enumerable.Empty<XmlNode>();
      IEnumerable<XmlNode> first2 = first1.Concat<XmlNode>(second1);
      IEnumerable<XmlNode> second2;
      if (xmlNode5 == null)
      {
        second2 = (IEnumerable<XmlNode>) null;
      }
      else
      {
        XmlNodeList source = xmlNode5.SelectNodes("DependModule");
        second2 = source != null ? source.Cast<XmlNode>() : (IEnumerable<XmlNode>) null;
      }
      if (second2 == null)
        second2 = Enumerable.Empty<XmlNode>();
      List<XmlNode> list = first2.Concat<XmlNode>(second2).ToList<XmlNode>();
      int? nullable5;
      int capacity;
      if (xmlNodeList5 == null)
      {
        nullable5 = xmlNodeList6?.Count;
        nullable4 = nullable5.HasValue ? new int?(nullable5.GetValueOrDefault()) : new int?();
        capacity = nullable4 ?? list.Count;
      }
      else
        capacity = xmlNodeList5.Count;
      List<DependentModuleMetadata> dependentModuleMetadataList = new List<DependentModuleMetadata>(capacity);
      int i5 = 0;
      while (true)
      {
        int num8 = i5;
        int? nullable6;
        if (xmlNodeList5 == null)
        {
          nullable5 = new int?();
          nullable6 = nullable5;
        }
        else
          nullable6 = new int?(xmlNodeList5.Count);
        nullable4 = nullable6;
        int valueOrDefault1 = nullable4.GetValueOrDefault();
        if (num8 < valueOrDefault1 & nullable4.HasValue)
        {
          XmlAttribute attribute3 = xmlNodeList5?[i5]?.Attributes?["id"];
          if (attribute3 != null)
          {
            XmlAttribute attribute4 = xmlNodeList5[i5]?.Attributes?["order"];
            LoadTypeParse result;
            LoadType loadType = attribute4 == null || !Enum.TryParse<LoadTypeParse>(attribute4.InnerText, out result) ? LoadType.None : (LoadType) result;
            XmlNode xmlNode6 = xmlNodeList5[i5];
            bool? nullable7;
            if (xmlNode6 == null)
            {
              nullable1 = new bool?();
              nullable7 = nullable1;
            }
            else
            {
              XmlAttributeCollection attributes = xmlNode6.Attributes;
              if (attributes == null)
              {
                nullable1 = new bool?();
                nullable7 = nullable1;
              }
              else
              {
                XmlAttribute xmlAttribute = attributes["optional"];
                if (xmlAttribute == null)
                {
                  nullable1 = new bool?();
                  nullable7 = nullable1;
                }
                else
                  nullable7 = new bool?(xmlAttribute.InnerText.Equals("true"));
              }
            }
            nullable1 = nullable7;
            bool valueOrDefault2 = nullable1.GetValueOrDefault();
            XmlNode xmlNode7 = xmlNodeList5[i5];
            bool? nullable8;
            if (xmlNode7 == null)
            {
              nullable1 = new bool?();
              nullable8 = nullable1;
            }
            else
            {
              XmlAttributeCollection attributes = xmlNode7.Attributes;
              if (attributes == null)
              {
                nullable1 = new bool?();
                nullable8 = nullable1;
              }
              else
              {
                XmlAttribute xmlAttribute = attributes["incompatible"];
                if (xmlAttribute == null)
                {
                  nullable1 = new bool?();
                  nullable8 = nullable1;
                }
                else
                  nullable8 = new bool?(xmlAttribute.InnerText.Equals("true"));
              }
            }
            nullable1 = nullable8;
            bool valueOrDefault3 = nullable1.GetValueOrDefault();
            ApplicationVersion version3;
            ApplicationVersion applicationVersion = ApplicationVersion.TryParse(xmlNodeList5[i5]?.Attributes?["version"]?.InnerText, out version3) ? version3 : ApplicationVersion.Empty;
            ApplicationVersionRange versionRange;
            ApplicationVersionRange applicationVersionRange = ApplicationVersionRange.TryParse(xmlNodeList5[i5]?.Attributes?["version"]?.InnerText ?? string.Empty, out versionRange) ? versionRange : ApplicationVersionRange.Empty;
            dependentModuleMetadataList.Add(new DependentModuleMetadata()
            {
              Id = attribute3.InnerText,
              LoadType = loadType,
              IsOptional = valueOrDefault2,
              IsIncompatible = valueOrDefault3,
              Version = applicationVersion,
              VersionRange = applicationVersionRange
            });
          }
          ++i5;
        }
        else
          break;
      }
      int i6 = 0;
      while (true)
      {
        int num9 = i6;
        int? nullable9;
        if (xmlNodeList6 == null)
        {
          nullable5 = new int?();
          nullable9 = nullable5;
        }
        else
          nullable9 = new int?(xmlNodeList6.Count);
        nullable4 = nullable9;
        int valueOrDefault = nullable4.GetValueOrDefault();
        if (num9 < valueOrDefault & nullable4.HasValue)
        {
          XmlAttribute attribute = xmlNodeList6?[i6]?.Attributes?["Id"];
          if (attribute != null)
            dependentModuleMetadataList.Add(new DependentModuleMetadata()
            {
              Id = attribute.InnerText,
              LoadType = LoadType.LoadAfterThis,
              IsOptional = false,
              IsIncompatible = false,
              Version = ApplicationVersion.Empty,
              VersionRange = ApplicationVersionRange.Empty
            });
          ++i6;
        }
        else
          break;
      }
      for (int index = 0; index < list.Count; ++index)
      {
        XmlAttribute attribute = list[index].Attributes?["Id"];
        if (attribute != null)
          dependentModuleMetadataList.Add(new DependentModuleMetadata()
          {
            Id = attribute.InnerText,
            LoadType = LoadType.None,
            IsOptional = true,
            IsIncompatible = false,
            Version = ApplicationVersion.Empty,
            VersionRange = ApplicationVersionRange.Empty
          });
      }
      XmlNode xmlNode8 = xmlNode1?.SelectSingleNode("RequiredGameVersion");
      string versionAsString = xmlNode8?.Attributes?["value"]?.InnerText ?? string.Empty;
      int num10;
      if (xmlNode8 == null)
      {
        num10 = 0;
      }
      else
      {
        XmlAttributeCollection attributes = xmlNode8.Attributes;
        bool? nullable10;
        if (attributes == null)
        {
          nullable1 = new bool?();
          nullable10 = nullable1;
        }
        else
        {
          XmlAttribute xmlAttribute = attributes["optional"];
          if (xmlAttribute == null)
          {
            nullable1 = new bool?();
            nullable10 = nullable1;
          }
          else
            nullable10 = new bool?(xmlAttribute.InnerText.Equals("true"));
        }
        nullable1 = nullable10;
        num10 = nullable1.GetValueOrDefault() ? 1 : 0;
      }
      bool flag5 = num10 != 0;
      ApplicationVersion version4;
      if (!string.IsNullOrWhiteSpace(versionAsString) && ApplicationVersion.TryParse(versionAsString, out version4))
      {
        foreach (string officialModuleId in ModuleInfoExtended.OfficialModuleIds)
        {
          string moduleId = officialModuleId;
          bool flag6 = moduleId.Equals(ModuleInfoExtended.NativeModuleId);
          DependentModuleMetadata dependentModuleMetadata = dependentModuleMetadataList.Find((Predicate<DependentModuleMetadata>) (dmm => dmm.Id.Equals(moduleId, StringComparison.Ordinal)));
          if (dependentModuleMetadata != null)
            dependentModuleMetadataList.Remove(dependentModuleMetadata);
          dependentModuleMetadataList.Add(new DependentModuleMetadata()
          {
            Id = moduleId,
            LoadType = LoadType.LoadBeforeThis,
            IsOptional = flag5 && !flag6,
            IsIncompatible = false,
            Version = version4,
            VersionRange = ApplicationVersionRange.Empty
          });
        }
      }
      return new ModuleInfoExtended()
      {
        Id = str1,
        Name = str2,
        IsOfficial = flag1,
        Version = version1,
        IsSingleplayerModule = flag2,
        IsMultiplayerModule = flag3,
        IsServerModule = flag4,
        SubModules = (IReadOnlyList<SubModuleInfoExtended>) moduleInfoExtendedList,
        DependentModules = (IReadOnlyList<DependentModule>) dependentModuleList1,
        ModulesToLoadAfterThis = (IReadOnlyList<DependentModule>) dependentModuleList2,
        IncompatibleModules = (IReadOnlyList<DependentModule>) dependentModuleList3,
        Url = str3,
        UpdateInfo = string.IsNullOrEmpty(str4) || string.IsNullOrEmpty(str5) ? string.Empty : str4 + ":" + str5,
        DependentModuleMetadatas = (IReadOnlyList<DependentModuleMetadata>) dependentModuleMetadataList
      };
    }

    public ModuleInfoExtended(
      string id,
      string name,
      bool isOfficial,
      ApplicationVersion version,
      bool isSingleplayerModule,
      bool isMultiplayerModule,
      IReadOnlyList<SubModuleInfoExtended> subModules,
      IReadOnlyList<DependentModule> dependentModules,
      IReadOnlyList<DependentModule> modulesToLoadAfterThis,
      IReadOnlyList<DependentModule> incompatibleModules,
      IReadOnlyList<DependentModuleMetadata> dependentModuleMetadatas,
      string url)
    {
      this.Id = id;
      this.Name = name;
      this.IsOfficial = isOfficial;
      this.Version = version;
      this.IsSingleplayerModule = isSingleplayerModule;
      this.IsMultiplayerModule = isMultiplayerModule;
      this.SubModules = subModules;
      this.DependentModules = dependentModules;
      this.ModulesToLoadAfterThis = modulesToLoadAfterThis;
      this.IncompatibleModules = incompatibleModules;
      this.DependentModuleMetadatas = dependentModuleMetadatas;
      this.Url = url;
    }

    public bool IsNative()
    {
      return this.Id.Equals(ModuleInfoExtended.NativeModuleId, StringComparison.OrdinalIgnoreCase);
    }

    public override string ToString()
    {
      return string.Format("{0} - {1}", (object) this.Id, (object) this.Version);
    }

    public virtual bool Equals(ModuleInfoExtended? other)
    {
      if ((object) other == null)
        return false;
      return (object) this == (object) other || this.Id == other.Id;
    }

    public override int GetHashCode() => this.Id.GetHashCode();

    [CompilerGenerated]
    protected virtual bool PrintMembers(StringBuilder builder)
    {
      RuntimeHelpers.EnsureSufficientExecutionStack();
      builder.Append("Id = ");
      builder.Append((object) this.Id);
      builder.Append(", Name = ");
      builder.Append((object) this.Name);
      builder.Append(", IsOfficial = ");
      builder.Append(this.IsOfficial.ToString());
      builder.Append(", Version = ");
      builder.Append((object) this.Version);
      builder.Append(", IsSingleplayerModule = ");
      builder.Append(this.IsSingleplayerModule.ToString());
      builder.Append(", IsMultiplayerModule = ");
      builder.Append(this.IsMultiplayerModule.ToString());
      builder.Append(", IsServerModule = ");
      builder.Append(this.IsServerModule.ToString());
      builder.Append(", SubModules = ");
      builder.Append((object) this.SubModules);
      builder.Append(", DependentModules = ");
      builder.Append((object) this.DependentModules);
      builder.Append(", ModulesToLoadAfterThis = ");
      builder.Append((object) this.ModulesToLoadAfterThis);
      builder.Append(", IncompatibleModules = ");
      builder.Append((object) this.IncompatibleModules);
      builder.Append(", Url = ");
      builder.Append((object) this.Url);
      builder.Append(", UpdateInfo = ");
      builder.Append((object) this.UpdateInfo);
      builder.Append(", DependentModuleMetadatas = ");
      builder.Append((object) this.DependentModuleMetadatas);
      return true;
    }

    [CompilerGenerated]
    protected ModuleInfoExtended(ModuleInfoExtended original)
    {
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CId\u003Ek__BackingField = original.\u003CId\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CName\u003Ek__BackingField = original.\u003CName\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CIsOfficial\u003Ek__BackingField = original.\u003CIsOfficial\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CVersion\u003Ek__BackingField = original.\u003CVersion\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CIsSingleplayerModule\u003Ek__BackingField = original.\u003CIsSingleplayerModule\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CIsMultiplayerModule\u003Ek__BackingField = original.\u003CIsMultiplayerModule\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CIsServerModule\u003Ek__BackingField = original.\u003CIsServerModule\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CSubModules\u003Ek__BackingField = original.\u003CSubModules\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CDependentModules\u003Ek__BackingField = original.\u003CDependentModules\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CModulesToLoadAfterThis\u003Ek__BackingField = original.\u003CModulesToLoadAfterThis\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CIncompatibleModules\u003Ek__BackingField = original.\u003CIncompatibleModules\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CUrl\u003Ek__BackingField = original.\u003CUrl\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CUpdateInfo\u003Ek__BackingField = original.\u003CUpdateInfo\u003Ek__BackingField;
      // ISSUE: reference to a compiler-generated field
      // ISSUE: reference to a compiler-generated field
      this.\u003CDependentModuleMetadatas\u003Ek__BackingField = original.\u003CDependentModuleMetadatas\u003Ek__BackingField;
    }
  }
}
